package com.ithaima.collectiondemo;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class MyCollectonDemo3 {
    public static void main(String[] args) {
        Collection<String> list = new ArrayList<>();
        list.add("qqq");
        list.add("www");
        list.add("eee");
        list.add("qqqq");

        Iterator<String> it = list.iterator();
        while (it.hasNext()){
            System.out.println(it.next());
        }
    }
}
